import request from '@/utils/request'
//登录
export function login (data) {
  return request({
    url: '/socialized-auth/login',
    method: 'post',
    data
  })
}
//获取用户信息
export function getInfo () {
  return request({
    url: '/socialized-system/user/getCurrentUserInfo',
    method: 'get'
  })
}


//根据用户id查角色
export function getUserRole (id) {
  return request({
    url: '/socialized-system/user/findRoleListByUserId?userId=' + id,
    method: 'get'
  })
}
//添加角色
export function addRoles (data) {
  return request({
    url: '/socialized-system/user/addRoles',
    method: 'post',
    data
  })
}


//退出
export function logout () {
  return request({
    url: '/socialized-auth/logout',
    method: 'get'
  })
}
